<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>

    <title>SpringMVC A+B</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script>
</head>
<script>
    $(document).ready(function () {
        $("#calculator").hide();

        $("#show-hide").click(function () {
            if ($(this).html() === "show") {
                $("#calculator").show();
                $(this).text("hide");
            } else {
                $("#calculator").hide();
                $("this").text("show");
            }
        })
    });
</script>
<body>

<div class='container-fluid'>
    <h1 class='text text-center'>${title}</h1>
    <button id="show-hide" class="btn btn-primary">show</button>
    <form class='bs-example' action="add" method="get" id="calculator">
        <div class='row'>
            <div class='col-xs-4'>
                <input class='form-control' type="text" name="a" value=""/>
            </div>
            <div class='col-xs-1'>
                <label class='text text-center'>+</label>
            </div>
            <div class='col-xs-4'>
                <input class='form-control' type="text" name="b" value=""/>
            </div>
            <div class='col-xs-2'>
                <input class='btn btn-primary btn-block' type="submit" value="="/>
            </div>
            <div class='col-xs-1'>
                <label class='text text-center'>${result}</label>
            </div>

        </div>
    </form>
</div>

</body>

</html>